package com.beans;

import creator.ui.graphics.Magicanvas;
import creator.ui.graphics.bean.Bean;
import java.awt.Image;
import java.util.ArrayList;

public class BackgroundBean extends Bean {

  private ArrayList<Image> bgList;
  private int bgX;
  private int bgY;
  private int bgW;
  private int bgH;

  public void initBean(Magicanvas arg0) {
    this.bgList =
      getGroupOfImages(
        new String[] { "/res/img/bg_morn.gif", "/res/img/bg_night.gif" }
      );

    trackerImages(this.bgList, arg0);
    this.bgX = -4;
    this.bgY = -27;
    this.bgW = 345;
    this.bgH = 614;
  }

  public Image getBg() {
    int i = (int) (Math.random() * 2.0D);
    return (Image) this.bgList.get(i);
  }

  public int getBgX() {
    return this.bgX;
  }

  public void setBgX(int bgX) {
    this.bgX = bgX;
  }

  public int getBgY() {
    return this.bgY;
  }

  public void setBgY(int bgY) {
    this.bgY = bgY;
  }

  public int getBgW() {
    return this.bgW;
  }

  public void setBgW(int bgW) {
    this.bgW = bgW;
  }

  public int getBgH() {
    return this.bgH;
  }

  public void setBgH(int bgH) {
    this.bgH = bgH;
  }
}
